package com.taldh.design.patterns.chain.impl;

/**
 * date 2020/6/4
 *
 * @author 袁小黑
 * @version 1.0.0
 **/

public abstract class Handler {

    private Handler next;

    public Handler(Handler next) {
        this.next = next;
    }

    public void saleHouse(Request request) {
        if (next != null) {
            next.saleHouse(request);
        }
    }

    protected void processHandle (int houseNum) {
        System.out.println("客人要"+houseNum+"套房子，"+this+"快出来招待客人！");
    }

}
